package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: EventsUpdateRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-27
 * @Version: 1.0
 * Table: pear_events
 * Comment:
 * 日程表
 */
public class EventsUpdateRequestConvert extends BaseConvert {
    public static EventsWithBLOBs convert(EventsUpdateRequest request) throws Exception {
        EventsWithBLOBs daoRequest = new EventsWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setTitle(daoRequest.getTitle() == null ? null : daoRequest.getTitle().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setDeletedTime(daoRequest.getDeletedTime() == null ? null : daoRequest.getDeletedTime().trim());
        daoRequest.setBeginTime(daoRequest.getBeginTime() == null ? null : daoRequest.getBeginTime().trim());
        daoRequest.setEndTime(daoRequest.getEndTime() == null ? null : daoRequest.getEndTime().trim());
        daoRequest.setProjectCode(daoRequest.getProjectCode() == null ? null : daoRequest.getProjectCode().trim());
        daoRequest.setPosition(daoRequest.getPosition() == null ? null : daoRequest.getPosition().trim());
        daoRequest.setCreatedBy(daoRequest.getCreatedBy() == null ? null : daoRequest.getCreatedBy().trim());
        daoRequest.setDescription(daoRequest.getDescription() == null ? null : daoRequest.getDescription().trim());

        return daoRequest;
    }
}
